<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
    <style>
      .more ul {
        display: none;
      }
      .more:hover ul {
        display: block;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <ul>
        <template v-for="item in navs">
          <li v-if="!item.options">{{item.title}}</li>
          <li v-else class="more">
            <a href="">{{item.title}}</a>
            <ul>
              <li v-for="option in item.options">{{option}}</li>
            </ul>
          </li>
        </template>
      </ul>
    </div>
  </body>
  <script>
    let app = Vue.createApp({
      data() {
        return {
          navs: [
            {
              title: "发现音乐",
            },
            {
              title: "客户端",
            },
            {
              title: "更多",
              options: ["音乐人", "主播"],
            },
          ],
        };
      },
    });
    app = app.mount("#app");
  </script>
</html>
